package com.foolishbird.sdk.ui.view;

import android.app.Activity;
import android.content.Context;
import android.content.DialogInterface;

import com.foolishbird.sdk.params.BindPhoneResponseParams;


public final class DialogFactory {

    private DialogFactory() {
    }

    public static ConfirmDialog createConfirmDialog(Context context, String message) {
        ConfirmDialog.Builder builder = new ConfirmDialog.Builder(context);
        builder.setMessage(message);
        return builder.create();
    }

    public static IDFaildDialog createIDFaildDialog(Context context, BindPhoneResponseParams message){
        IDFaildDialog.Builder builder = new IDFaildDialog.Builder(context);
        builder.setMessage(message);
        return builder.create();
    }

    public static AlertDialog createAlertDialog(Context context, String message) {
        AlertDialog.Builder builder = new AlertDialog.Builder(context);
        builder.setMessage(message);
        return builder.create();
    }

    public static ProgressDialog createProgressDialog(Context context) {
        return new ProgressDialog.Builder(context).create();
    }

    public static ExitAppDialog createExitAppDialog(Activity activity, String imageUrl){
        ExitAppDialog.Builder builder = new ExitAppDialog.Builder(activity);
        builder.setImageUrl(imageUrl);
        return builder.create();
    }

    public static ExitAppDialog createExitAppDialog(Activity activity, String imageUrl, DialogInterface.OnClickListener listener){
        ExitAppDialog.Builder builder = new ExitAppDialog.Builder(activity);
        builder.setImageUrl(imageUrl);
        builder.setOnClickListener(listener);
        return builder.create();
    }

}
